package ac2.util.serial.handlers;

import ac2.util.serial.packets.IBytePacket;
import ac2.util.serial.packets.VentStatusUpdatePacket;

public class VentStatusUpdatePacketHandler extends AC2PacketHandler {

	public void handlePacket(IBytePacket genericPacket) {

		VentStatusUpdatePacket packet = (VentStatusUpdatePacket) genericPacket;
		
		//   /ventstatus/zone/<nodeId>/state/<0 for closed, 1 for open>/mode/<0 for heat, 1 for cool>
		String url = BaseUrl + "/setting/status/zone/" + packet.getSenderNode() + 
			"/state/" + packet.getState() +
			"/mode/" + packet.getMode();

		sendCommand(url);

	}

}
